﻿/* Schema管理样式 */

.schema-list {
    margin-bottom: 20px;
}

.schema-list-header h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #34495e;
}

.schema-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.schema-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.schema-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.schema-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.schema-item-title {
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
}

.schema-item-actions {
    display: flex;
    gap: 5px;
}

.schema-item-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
}

.schema-item-desc {
    color: #7f8c8d;
    font-size: 13px;
    margin-bottom: 10px;
}

.schema-item-fields {
    font-size: 12px;
    color: #95a5a6;
}

/* Schema编辑器 */
.schema-editor {
    border-top: 2px solid #ecf0f1;
    padding-top: 20px;
    margin-top: 20px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.editor-header h3 {
    font-size: 18px;
    color: #2c3e50;
}

.editor-actions {
    display: flex;
    gap: 10px;
}

.editor-basic-info {
    max-width: 900px;
    margin-bottom: 20px;
}

/* 左右分栏编辑器 */
.split-editor {
    display: flex;
    gap: 20px;
    height: 600px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.editor-sidebar {
    width: 280px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.sidebar-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.sidebar-header-actions {
    display: flex;
    gap: 8px;
}

.editor-main {
    flex: 1;
    background: white;
    overflow-y: auto;
    padding: 20px;
}

/* 字段列表 */
.fields-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.field-list-item {
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.field-list-item:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

.field-list-item.active {
    border-color: #3498db;
    background: #e3f2fd;
}

.field-list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-list-item-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.field-list-item-type {
    font-size: 12px;
    color: #7f8c8d;
    background: #ecf0f1;
    padding: 2px 8px;
    border-radius: 3px;
}

.field-list-item-label {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 5px;
}

/* 字段编辑器 */
.field-editor-container,
.data-row-editor-container {
    min-height: 100%;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #95a5a6;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 14px;
}

.field-editor {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.field-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.field-editor-header h4 {
    font-size: 16px;
    color: #2c3e50;
    margin: 0;
}

.field-compact-row {
    display: grid;
    grid-template-columns: 1fr 1fr 150px 150px;
    gap: 15px;
    margin-bottom: 15px;
    align-items: end;
}

.field-compact-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.field-options-row {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 10px 0;
    flex-wrap: wrap;
}

.field-options-row label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    white-space: nowrap;
    font-size: 14px;
    cursor: pointer;
}

.field-options-row input[type="checkbox"] {
    margin: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e;
    font-size: 14px;
}

.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.form-group input[type="checkbox"] {
    margin: 0;
    width: auto;
}

.raw-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    font-weight: normal;
    cursor: help;
    vertical-align: middle;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

.raw-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
    font-weight: 600;
    cursor: help;
}

/* 数据行列表 */
